<style lang="scss" scoped>
    @import '@/assets/css/index';
    .getMoney{
        @include page();
        .box{
            display: flex;
            flex-direction: column;
            align-items: center;
            background-color: white;
            .money{
                font-size: 4rem;
                font-weight: bold;
            }
            .btn{
                width: 20rem;
                margin-top: 2rem;
            }
        }
    }
</style>
<template>
  <div class="getMoney">
      <div class="box padding-all-l">
            <div class="color-m margT-m">可提现余额(元)</div>
            <div class="money margT-l">{{myInfo.unsettle}}</div>
            <div class="btn">
                <van-button @click="toApplyView" :style="{backgroundColor:$store.getters.getMasterColor,color:'white'}" round block>申请提现</van-button>
            </div>
      </div>
      <div class="function-box margT-l">
        <!-- <van-cell title="扫码核销" is-link @click="scanCode"/> -->
        <van-cell title="余额明细" is-link to="getMoneyRecord"/>
      </div>
  </div>
</template>

<script>
import { Button, Cell } from 'vant'
export default {
    name: 'GetMoney',
    components: {
        [Button.name]: Button,
        [Cell.name]: Cell
    },
    data () {
        return {
            myInfo:''   
        }
    },
    mounted () {
        this.myInfo = this.$store.state.myInfo
        if(!this.myInfo){
            this.$router.go(-1)
            return
        }
    },
    methods: {
        toApplyView() {
            this.$router.push('/applyGetMoney')
        }
    }
}
</script>